<html>
<title>闭包学习</title>
<head></head>
<body>


</body>
<script>
var cache = {};
var mult = function(){
	var args = Array.prototype.join.call(arguments,',');
	//console.info(args);
	if( cache[args]){
		return cache[args];
	}
	var a = 1; 
	for( var i = 0, l = arguments.length;i<l;i++){
		a = a * arguments[i];
	}
	//console.info(cache);
	return cache[args] = a;
}
console.info(mult(1,2,3));
console.info(mult(1,2,3));
</script>
</html>